package cn.poem.controller;

import cn.poem.base.ResponseData;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Description 点赞
 * @Author sugar
 * @Date 2021/6/15 5:47 PM
 * @Version 1.0
 */
@RequestMapping("poem/like")
public interface LikeController {

    /**
     * 点赞
     * @param code
     * @param objectId
     * @return
     */
    @PutMapping("{code}/{objectId}")
    ResponseData<Boolean> likePoetry(@PathVariable("code") int code, @PathVariable("objectId") Long objectId);

    /**
     * 取消
     * @param id
     * @return
     */
    @PutMapping("cancel/{id}")
    ResponseData<Boolean> likePoetry( @PathVariable("id") Long id);

    /**
     * 点赞总数
     * @param code
     * @param objectId
     * @return
     */
    @GetMapping("{code}/{objectId}")
    ResponseData<Integer> likeCount(@PathVariable("code") int code, @PathVariable("objectId") Long objectId);







}
